Integrand size = 17, antiderivative size = 72 \[ \int \frac {(a+b x)^2 \sin (c+d x)}{x^2} \, dx=-\frac {b^2 \cos (c+d x)}{d}+a^2 d \cos (c) \operatorname {CosIntegral}(d x)+2 a b \operatorname {CosIntegral}(d x) \sin (c)-\frac {a^2 \sin (c+d x)}{x}+2 a b \cos (c) \text {Si}(d x)-a^2 d \sin (c) \text {Si}(d x) \]
a^2*d*Ci(d*x)*cos(c)-b^2*cos(d*x+c)/d+2*a*b*cos(c)*Si(d*x)+2*a*b*Ci(d*x)*s in(c)-a^2*d*Si(d*x)*sin(c)-a^2*sin(d*x+c)/x
Time = 0.16 (sec) , antiderivative size = 64, normalized size of antiderivative = 0.89 \[ \int \frac {(a+b x)^2 \sin (c+d x)}{x^2} \, dx=-\frac {b^2 \cos (c+d x)}{d}+a \operatorname {CosIntegral}(d x) (a d \cos (c)+2 b \sin (c))-\frac {a^2 \sin (c+d x)}{x}-a (-2 b \cos (c)+a d \sin (c)) \text {Si}(d x) \]
-((b^2*Cos[c + d*x])/d) + a*CosIntegral[d*x]*(a*d*Cos[c] + 2*b*Sin[c]) - ( a^2*Sin[c + d*x])/x - a*(-2*b*Cos[c] + a*d*Sin[c])*SinIntegral[d*x]
Time = 0.41 (sec) , antiderivative size = 72, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.118, Rules used = {7293, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {(a+b x)^2 \sin (c+d x)}{x^2} \, dx\) |
\(\Big \downarrow \) 7293 |
\(\displaystyle \int \left (\frac {a^2 \sin (c+d x)}{x^2}+\frac {2 a b \sin (c+d x)}{x}+b^2 \sin (c+d x)\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle a^2 d \cos (c) \operatorname {CosIntegral}(d x)-a^2 d \sin (c) \text {Si}(d x)-\frac {a^2 \sin (c+d x)}{x}+2 a b \sin (c) \operatorname {CosIntegral}(d x)+2 a b \cos (c) \text {Si}(d x)-\frac {b^2 \cos (c+d x)}{d}\) |
-((b^2*Cos[c + d*x])/d) + a^2*d*Cos[c]*CosIntegral[d*x] + 2*a*b*CosIntegra l[d*x]*Sin[c] - (a^2*Sin[c + d*x])/x + 2*a*b*Cos[c]*SinIntegral[d*x] - a^2 *d*Sin[c]*SinIntegral[d*x]
3.1.14.3.1 Defintions of rubi rules used
Time = 0.25 (sec) , antiderivative size = 74, normalized size of antiderivative = 1.03
method | result | size |
derivativedivides | \(d \left (a^{2} \left (-\frac {\sin \left (d x +c \right )}{d x}-\operatorname {Si}\left (d x \right ) \sin \left (c \right )+\operatorname {Ci}\left (d x \right ) \cos \left (c \right )\right )+\frac {2 a b \left (\operatorname {Si}\left (d x \right ) \cos \left (c \right )+\operatorname {Ci}\left (d x \right ) \sin \left (c \right )\right )}{d}-\frac {b^{2} \cos \left (d x +c \right )}{d^{2}}\right )\) | \(74\) |
default | \(d \left (a^{2} \left (-\frac {\sin \left (d x +c \right )}{d x}-\operatorname {Si}\left (d x \right ) \sin \left (c \right )+\operatorname {Ci}\left (d x \right ) \cos \left (c \right )\right )+\frac {2 a b \left (\operatorname {Si}\left (d x \right ) \cos \left (c \right )+\operatorname {Ci}\left (d x \right ) \sin \left (c \right )\right )}{d}-\frac {b^{2} \cos \left (d x +c \right )}{d^{2}}\right )\) | \(74\) |
risch | \(i \cos \left (c \right ) \operatorname {Ei}_{1}\left (-i d x \right ) a b -\frac {d \cos \left (c \right ) a^{2} \operatorname {Ei}_{1}\left (-i d x \right )}{2}-i \cos \left (c \right ) \operatorname {Ei}_{1}\left (i d x \right ) a b -\frac {d \cos \left (c \right ) a^{2} \operatorname {Ei}_{1}\left (i d x \right )}{2}-\sin \left (c \right ) \operatorname {Ei}_{1}\left (-i d x \right ) a b -\frac {i d \sin \left (c \right ) a^{2} \operatorname {Ei}_{1}\left (-i d x \right )}{2}-\sin \left (c \right ) \operatorname {Ei}_{1}\left (i d x \right ) a b +\frac {i d \sin \left (c \right ) a^{2} \operatorname {Ei}_{1}\left (i d x \right )}{2}-\frac {b^{2} \cos \left (d x +c \right )}{d}-\frac {a^{2} \sin \left (d x +c \right )}{x}\) | \(146\) |
meijerg | \(\frac {b^{2} \sin \left (c \right ) \sin \left (d x \right )}{d}+\frac {b^{2} \sqrt {\pi }\, \cos \left (c \right ) \left (\frac {1}{\sqrt {\pi }}-\frac {\cos \left (d x \right )}{\sqrt {\pi }}\right )}{d}+a b \sqrt {\pi }\, \sin \left (c \right ) \left (\frac {2 \gamma +2 \ln \left (x \right )+\ln \left (d^{2}\right )}{\sqrt {\pi }}-\frac {2 \gamma }{\sqrt {\pi }}-\frac {2 \ln \left (2\right )}{\sqrt {\pi }}-\frac {2 \ln \left (\frac {d x}{2}\right )}{\sqrt {\pi }}+\frac {2 \,\operatorname {Ci}\left (d x \right )}{\sqrt {\pi }}\right )+2 a b \cos \left (c \right ) \operatorname {Si}\left (d x \right )+\frac {a^{2} \sqrt {\pi }\, \sin \left (c \right ) d^{2} \left (-\frac {4 d^{2} \cos \left (x \sqrt {d^{2}}\right )}{x \left (d^{2}\right )^{\frac {3}{2}} \sqrt {\pi }}-\frac {4 \,\operatorname {Si}\left (x \sqrt {d^{2}}\right )}{\sqrt {\pi }}\right )}{4 \sqrt {d^{2}}}+\frac {a^{2} \sqrt {\pi }\, \cos \left (c \right ) d \left (\frac {4 \gamma -4+4 \ln \left (x \right )+4 \ln \left (d \right )}{\sqrt {\pi }}+\frac {4}{\sqrt {\pi }}-\frac {4 \gamma }{\sqrt {\pi }}-\frac {4 \ln \left (2\right )}{\sqrt {\pi }}-\frac {4 \ln \left (\frac {d x}{2}\right )}{\sqrt {\pi }}-\frac {4 \sin \left (d x \right )}{\sqrt {\pi }\, d x}+\frac {4 \,\operatorname {Ci}\left (d x \right )}{\sqrt {\pi }}\right )}{4}\) | \(245\) |
d*(a^2*(-sin(d*x+c)/d/x-Si(d*x)*sin(c)+Ci(d*x)*cos(c))+2/d*a*b*(Si(d*x)*co s(c)+Ci(d*x)*sin(c))-1/d^2*b^2*cos(d*x+c))
Time = 0.28 (sec) , antiderivative size = 84, normalized size of antiderivative = 1.17 \[ \int \frac {(a+b x)^2 \sin (c+d x)}{x^2} \, dx=-\frac {b^{2} x \cos \left (d x + c\right ) + a^{2} d \sin \left (d x + c\right ) - {\left (a^{2} d^{2} x \operatorname {Ci}\left (d x\right ) + 2 \, a b d x \operatorname {Si}\left (d x\right )\right )} \cos \left (c\right ) + {\left (a^{2} d^{2} x \operatorname {Si}\left (d x\right ) - 2 \, a b d x \operatorname {Ci}\left (d x\right )\right )} \sin \left (c\right )}{d x} \]
-(b^2*x*cos(d*x + c) + a^2*d*sin(d*x + c) - (a^2*d^2*x*cos_integral(d*x) + 2*a*b*d*x*sin_integral(d*x))*cos(c) + (a^2*d^2*x*sin_integral(d*x) - 2*a* b*d*x*cos_integral(d*x))*sin(c))/(d*x)
\[ \int \frac {(a+b x)^2 \sin (c+d x)}{x^2} \, dx=\int \frac {\left (a + b x\right )^{2} \sin {\left (c + d x \right )}}{x^{2}}\, dx \]
Result contains complex when optimal does not.
Time = 0.68 (sec) , antiderivative size = 122, normalized size of antiderivative = 1.69 \[ \int \frac {(a+b x)^2 \sin (c+d x)}{x^2} \, dx=\frac {{\left ({\left (a^{2} {\left (\Gamma \left (-1, i \, d x\right ) + \Gamma \left (-1, -i \, d x\right )\right )} \cos \left (c\right ) - a^{2} {\left (i \, \Gamma \left (-1, i \, d x\right ) - i \, \Gamma \left (-1, -i \, d x\right )\right )} \sin \left (c\right )\right )} d^{2} + 2 \, {\left (a b {\left (i \, \Gamma \left (-1, i \, d x\right ) - i \, \Gamma \left (-1, -i \, d x\right )\right )} \cos \left (c\right ) + a b {\left (\Gamma \left (-1, i \, d x\right ) + \Gamma \left (-1, -i \, d x\right )\right )} \sin \left (c\right )\right )} d\right )} x - 2 \, {\left (b^{2} x + 2 \, a b\right )} \cos \left (d x + c\right )}{2 \, d x} \]
1/2*(((a^2*(gamma(-1, I*d*x) + gamma(-1, -I*d*x))*cos(c) - a^2*(I*gamma(-1 , I*d*x) - I*gamma(-1, -I*d*x))*sin(c))*d^2 + 2*(a*b*(I*gamma(-1, I*d*x) - I*gamma(-1, -I*d*x))*cos(c) + a*b*(gamma(-1, I*d*x) + gamma(-1, -I*d*x))* sin(c))*d)*x - 2*(b^2*x + 2*a*b)*cos(d*x + c))/(d*x)
Result contains higher order function than in optimal. Order 9 vs. order 4.
Time = 0.29 (sec) , antiderivative size = 743, normalized size of antiderivative = 10.32 \[ \int \frac {(a+b x)^2 \sin (c+d x)}{x^2} \, dx=\text {Too large to display} \]
-1/2*(a^2*d^2*x*real_part(cos_integral(d*x))*tan(1/2*d*x)^2*tan(1/2*c)^2 + a^2*d^2*x*real_part(cos_integral(-d*x))*tan(1/2*d*x)^2*tan(1/2*c)^2 + 2*a ^2*d^2*x*imag_part(cos_integral(d*x))*tan(1/2*d*x)^2*tan(1/2*c) - 2*a^2*d^ 2*x*imag_part(cos_integral(-d*x))*tan(1/2*d*x)^2*tan(1/2*c) + 4*a^2*d^2*x* sin_integral(d*x)*tan(1/2*d*x)^2*tan(1/2*c) + 2*a*b*d*x*imag_part(cos_inte gral(d*x))*tan(1/2*d*x)^2*tan(1/2*c)^2 - 2*a*b*d*x*imag_part(cos_integral( -d*x))*tan(1/2*d*x)^2*tan(1/2*c)^2 + 4*a*b*d*x*sin_integral(d*x)*tan(1/2*d *x)^2*tan(1/2*c)^2 - a^2*d^2*x*real_part(cos_integral(d*x))*tan(1/2*d*x)^2 - a^2*d^2*x*real_part(cos_integral(-d*x))*tan(1/2*d*x)^2 - 4*a*b*d*x*real _part(cos_integral(d*x))*tan(1/2*d*x)^2*tan(1/2*c) - 4*a*b*d*x*real_part(c os_integral(-d*x))*tan(1/2*d*x)^2*tan(1/2*c) + a^2*d^2*x*real_part(cos_int egral(d*x))*tan(1/2*c)^2 + a^2*d^2*x*real_part(cos_integral(-d*x))*tan(1/2 *c)^2 - 2*a*b*d*x*imag_part(cos_integral(d*x))*tan(1/2*d*x)^2 + 2*a*b*d*x* imag_part(cos_integral(-d*x))*tan(1/2*d*x)^2 - 4*a*b*d*x*sin_integral(d*x) *tan(1/2*d*x)^2 + 2*a^2*d^2*x*imag_part(cos_integral(d*x))*tan(1/2*c) - 2* a^2*d^2*x*imag_part(cos_integral(-d*x))*tan(1/2*c) + 4*a^2*d^2*x*sin_integ ral(d*x)*tan(1/2*c) + 2*a*b*d*x*imag_part(cos_integral(d*x))*tan(1/2*c)^2 - 2*a*b*d*x*imag_part(cos_integral(-d*x))*tan(1/2*c)^2 + 4*a*b*d*x*sin_int egral(d*x)*tan(1/2*c)^2 + 2*b^2*x*tan(1/2*d*x)^2*tan(1/2*c)^2 - a^2*d^2*x* real_part(cos_integral(d*x)) - a^2*d^2*x*real_part(cos_integral(-d*x)) ...
Timed out. \[ \int \frac {(a+b x)^2 \sin (c+d x)}{x^2} \, dx=\int \frac {\sin \left (c+d\,x\right )\,{\left (a+b\,x\right )}^2}{x^2} \,d x \]